package com.sun.services;

import com.sun.entity.User;
import org.omg.CORBA.UserException;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

/**
 * @author wst
 * @create 2021-02-06
 */
public interface UserService {

    public User login(User user, String rememberMe, HttpServletResponse response) throws UserException, com.sun.common.exception.UserException;

    public void register(User user) throws UserException, com.sun.common.exception.UserException;

    public User getUserById(int id);

    public int updateUser(int id, String gender, String name, String province,
                          String city, String area, String cellphone, String zipCode, String address, String email) throws UserException, com.sun.common.exception.UserException;

    public User loginByCookie(HttpServletRequest request, HttpServletResponse response);

    public void logout(HttpSession session, HttpServletRequest request, HttpServletResponse response);
}
